import 'package:flutter/material.dart';

class HiBarrage extends StatelessWidget {
  final int priority;
  final String barrage;

  const HiBarrage({super.key, required this.barrage, required this.priority});

  @override
  Widget build(BuildContext context) {
    if (priority == 1) {
      return _barrage1();
    }
    return Text(
      barrage,
      style: const TextStyle(color: Colors.white),
    );
  }

  _barrage1() {
    return Center(
      child: Container(
        padding: const EdgeInsets.only(left: 10,right: 10),
        decoration: BoxDecoration(
            borderRadius: BorderRadius.circular(15),
            border: Border.all(color: Colors.white)),
        child: Text(
          barrage,
          style: const TextStyle(color: Colors.deepOrangeAccent),
        ),
      ),
    );
  }
}
